﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Users.aspx.cs" Inherits="Admin_Users" MasterPageFile="~/Admin/MasterPage.master" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="MainContent">
<h1>Пользователи</h1>
    <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="false" CssClass="SiteStats"
        AllowPaging="false" AlternatingRowStyle-CssClass="SiteStatsA" RowStyle-CssClass="SiteStats"
        Width="98%" AllowSorting="true" OnRowDataBound="gvUsers_RowBound">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="Пользователь" HeaderStyle-CssClass="StatsHeader"/>
            <asp:TemplateField HeaderText="Действие" HeaderStyle-CssClass="StatsHeader">
            <ItemTemplate>
               <asp:Button OnCommand="btnDeleteUser_Click" CausesValidation="false" UseSubmitBehavior="false" CommandArgument='<%# Eval("ID") %>'
                    Text='удалить' ID="btnDeleteUser" CssClass="but" runat="server"  />
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <table>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartner" Text="Добавить Пользователя:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartnerText" Text="Имя пользователя:"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" CssClass="TextField" ID="txtUserName"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label runat="server" CssClass="RegularText" ID="lblAddPartnerLink" Text="Пароль:"></asp:Label>
            </td>
            <td>
                <asp:TextBox runat="server" CssClass="TextField" ID="txtPassword"  TextMode="Password"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button runat="server" ID="btnAddUser" Text="Добавить" 
                    onclick="btnAddUser_Click" />
            </td>
        </tr>
    </table>
</asp:Content>